home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / ALL95.LZH / letters_tj / text0010.txt < prev    next >
Encoding:
Text File  |  1995-10-04  |  3.7 KB  |  82 lines

  1. Hello Johan,
  2.  
  3.  Thank you for your kind letter.  I am glad that my code has been helpful to 
  4. you.  As far as advertising it more in rec.games.programmer, well, there are 
  5. *LOTS* of different opinions there on how Doom works.  Who knows, my 
  6. implementation may not even be the one used in ID's engine - but I think it is.
  7.  
  8. So, a couple of questions:
  9. - Have you given any though as to how sprite clipping would be handled?
  10.  
  11.  Actually, I had thought that I would sort the sprites and draw them with a 
  12. painter algorithm somehow.  I'm still not sure how I'd go about clipping them 
  13. to the walls and stuff.
  14.  
  15. - Have you done anything else on the program since you released it?
  16.  
  17.  No I haven't made any improvements to the code.  It's been sitting around on 
  18. my HD gathering dust since last Christmas.
  19.  
  20. - Any ideas on what could be improved/optimized?
  21.  
  22.  Well, the BSP faq *claims* that the backface culling can be done in one 
  23. instruction.  I disagree with this, but I'm still trying to proove myself wrong.
  24.  I've heard that using a non-recursive method for traversing the tree will 
  25. speed things up.  I experimented with this one time and it slowed the engine 
  26. down by a factor of 10!  I was probably doing it wrong though.
  27.  
  28. - Do you know if anyone else is using the sources?
  29.  
  30.  I've gotten several letters from people like yourself.  I posted the code both 
  31. on r.g.p and on compuserve.  Several of them have ported it to WinG for Windows 
  32. and Windows NT, as well as Linux.  Most people have ported it to the Watcom 
  33. compiler (but the exe is still faster under MSVC 1.5 - go figure).  I gave one 
  34. guy permission to use it in a book on windows game programming, but I haven't 
  35. heard anything from him in a while.  Haven't seen the book on the shelves 
  36. either.
  37.  
  38. Finally a couple of bug reports:
  39. - For some of the load routines the calculation of the number of
  40.   structure items to load is less than perfect (negative results can occur).
  41.   The (short) typecast is in the wrong position.
  42.  
  43.  I was not aware of this one.  Thanks.
  44.  
  45. - You may have noticed that there are sometimes very strange distortions
  46.   near the 'front'. I've traced this to the first of your clippings, the
  47.   one where you clip to an x=z line.
  48.   If you remove that clipping completely, everything works nicely.
  49.   Was there a reason for the clip?
  50.   If so, why only clip the 'from' coordinates and not the 'to' ones (or
  51.   perhaps it was the other way around)?
  52.  
  53.  The field of vision is 90 degrees.  So if you clip the walls against x=z this 
  54. will take care of your left and right side screen clipping.  I *could* handle 
  55. this in the line drawing part, but there is another reason for doing it here.
  56.  The other reason is for texture mapping.  I know, I'm not doing any texture 
  57. mapping, but I was trying to when I wrote it.  I clip on the x=z (left side) do 
  58. determine the offset into the texture for the wall.  Otherwise it would look 
  59. like the wall was crawling along with you when you moved.  The reason that I do 
  60. not clip on the right side is because I was drawing the textures from left to 
  61. right, and I can just stop drawing when I reach the right side of the screen.  
  62. This does not affect the way that the texture looks.
  63.  I hope that makes sense.  Anyway, if you aren't doing any texmapping, the you 
  64. could probably take all that stuff out of the code.  especially if you get a 
  65. speed increase.
  66.  
  67.  
  68. By the way, the maze looks much better if you let the name of the textures
  69. used set the colours (I XOR the characters in the name right now, but a
  70. more sophisticated algorithm would be better).
  71.  
  72.  Hmmm, thats a good idea.  I'll give it a shot.
  73.  
  74.  
  75. Thanks for all of your questions and suggestions.  If you have any more, feel 
  76. free to send me some mail.
  77.  
  78. Jake Hill
  79. jkhil@dbsoftware.com
  80.  
  81.  
  82.